﻿@using ExampleWebApplication.Properties
@{
    ViewBag.Title = "EntityFramework Examples";
}

<h2>EntityFramework Examples</h2>

<button id="openAllButton">Open All</button>

<ul id="examplesLinks">
    <li>@Html.ActionLink(EntityFrameworkStrings.Example1, "CustomAjaxBinding")<br/><br/></li>
    <li>@Html.ActionLink(EntityFrameworkStrings.Example2, "CustomServerBinding")<br/><br/></li>
    <li>@Html.ActionLink(EntityFrameworkStrings.Example3, "TwoQueriesToCountAndList")<br/><br/></li>
    <li>@Html.ActionLink(EntityFrameworkStrings.Example4, "MappingTechniques")<br/><br/></li>
    <li>@Html.ActionLink(EntityFrameworkStrings.Example5, "AggregatesServerSide")<br/><br/></li>
    <li>@Html.ActionLink(EntityFrameworkStrings.Example6, "AggregatesClientSide")<br/><br/></li>
    <li>@Html.ActionLink(EntityFrameworkStrings.Example7, "DirectUsageOfTEntity")<br/><br/></li>
    <li>@Html.ActionLink(EntityFrameworkStrings.Example8d1, "CustomAggregatesFunctionsClientSide")<br/><br/></li>
    <li>@Html.ActionLink(EntityFrameworkStrings.Example8d2, "CustomAggregatesFunctionsInlineClientSide")<br/><br/></li>
    <li>@Html.ActionLink(EntityFrameworkStrings.Example8d3, "CustomAggregatesFunctionsIgnoreGroupAggregatesClientSide")<br/><br/></li>
    <li>@Html.ActionLink(EntityFrameworkStrings.Example8d4, "CustomAggregatesFunctionsInlineDirectUsageOfTEntityClientSide")<br/><br/></li>
    <li>@Html.ActionLink(EntityFrameworkStrings.Example9, "UsingProjections")<br/><br/></li>
    <li>@Html.ActionLink(EntityFrameworkStrings.Example10, "BooleanSubstitute")<br/><br/></li>
    <li>@Html.ActionLink(EntityFrameworkStrings.Example11, "ValueResolver")<br/><br/></li>
    <li>@Html.ActionLink(EntityFrameworkStrings.Example12d1, "FilteringNullableValues")<br/><br/></li>
    <li>@Html.ActionLink(EntityFrameworkStrings.Example12d2, "FilteringWithNullAliases")<br/><br/></li>
    <li>@Html.ActionLink(EntityFrameworkStrings.Example12d3, "FilteringWithNullSubstitutes")<br/><br/></li>
    <li>@Html.ActionLink(EntityFrameworkStrings.Example13, "CaseInsensitiveSearch")<br/><br/></li>
</ul>


@section customScripts
{
    <script>

        $(document).ready(function () {
            $('#examplesLinks li a').each(function () {
                $(this).attr('target', '_blank');
            });
        });
        
        $("#openAllButton").click(function () {
            $('#examplesLinks li a').each(function () {
                $(this)[0].click();
                //window.open($(this).prop('href'), '_blank');
            });
        });
        
    </script>
}
